home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmSpin
- BackColor = &H00808080&
- BorderStyle = 1 'Fixed Single
- Caption = "The Spin Program"
- ClientHeight = 4995
- ClientLeft = 1800
- ClientTop = 1800
- ClientWidth = 4335
- Height = 5685
- Icon = "SPIN.frx":0000
- Left = 1740
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 4995
- ScaleWidth = 4335
- Top = 1170
- Width = 4455
- Begin VB.CheckBox chkCustomPictures
- BackColor = &H00808080&
- Caption = "&Use Custom Pictures"
- Height = 255
- Left = 240
- TabIndex = 3
- Top = 3720
- Width = 1935
- End
- Begin VB.HScrollBar hsbInterval
- Height = 255
- Left = 240
- Max = 1000
- Min = 50
- SmallChange = 100
- TabIndex = 2
- Top = 4200
- Value = 50
- Width = 3855
- End
- Begin TegoswLibCtl.Tegosw swExit
- Height = 630
- Left = 0
- TabIndex = 6
- Top = 0
- Width = 525
- _version = 65536
- _extentx = 926
- _extenty = 1111
- _stockprops = 64
- value = -1 'True
- End
- Begin VB.Label lblSlowest
- BackColor = &H00808080&
- Caption = "Slowest"
- Height = 255
- Left = 3480
- TabIndex = 5
- Top = 4440
- Width = 615
- End
- Begin VB.Label lblFastest
- BackColor = &H00808080&
- Caption = "Fastest"
- Height = 255
- Left = 240
- TabIndex = 4
- Top = 4440
- Width = 615
- End
- Begin VB.Label lblCounter
- Alignment = 2 'Center
- BackColor = &H00808080&
- Caption = "0"
- BeginProperty Font
- name = "Times New Roman"
- charset = 0
- weight = 400
- size = 72
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 1455
- Left = 720
- TabIndex = 1
- Top = 0
- Width = 3015
- End
- Begin TegspinLibCtl.TegoSpin TegoSpin1
- Height = 1800
- Left = 1920
- TabIndex = 0
- Top = 1680
- Width = 900
- _version = 65536
- _extentx = 1588
- _extenty = 3175
- _stockprops = 64
- bevelwidth = 9
- interval = 50
- picturespinup = "SPIN.frx":030A
- picturespindown = "SPIN.frx":0326
- End
- Begin VB.Menu mnuFile
- Caption = "&File"
- Begin VB.Menu mnuExit
- Caption = "E&xit"
- End
- End
- Begin VB.Menu mnuHelp
- Caption = "Help"
- Begin VB.Menu mnuAbout
- Caption = "&About..."
- End
- End
- Attribute VB_Name = "frmSpin"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- ' All variables must be declared.
- Option Explicit
- Private Sub chkCustomPictures_Click()
- Dim Path
- ' Get the name of the directory where the
- ' program resides.
- Path = App.Path
- If Right(Path, 1) <> "\" Then
- Path = Path + "\"
- End If
- ' If the chkCustomPictures check box is checked, load pictures
- ' into the spin control. Otherwise, unload the pictures from the
- ' spin control.
- If chkCustomPictures.Value = 0 Then
- TegoSpin1.PictureSpinUp = LoadPicture("")
- TegoSpin1.PictureSpinDown = LoadPicture("")
- Else
- TegoSpin1.PictureSpinUp = LoadPicture(Path + "SpinUp.BMP")
- TegoSpin1.PictureSpinDown = LoadPicture(Path + "SpinDown.BMP")
- End If
- End Sub
- Private Sub hsbInterval_Change()
- ' Set the Interval property of the spin control to the value
- ' of the hsbInterval scroll bar.
- TegoSpin1.Interval = hsbInterval.Value
- End Sub
- Private Sub mnuAbout_Click()
- Dim Title
- Dim Msg
- Dim CR
- CR = Chr(13) + Chr(10)
- ' The title of the About message box.
- Title = "About the Spin Program"
- ' Prepare the message of the About message box.
- Msg = "This program was written with Visual "
- Msg = Msg + "Basic for Windows, using the "
- Msg = Msg + "TegoSoft Spin OCX control. "
- Msg = Msg + CR + CR
- Msg = Msg + "The TegoSoft Spin OCX control "
- Msg = Msg + "is part of the TegoSoft OCX Control "
- Msg = Msg + "Kit - a collection of various OCX controls. "
- Msg = Msg + CR + CR
- Msg = Msg + "For more information about the "
- Msg = Msg + "TegoSoft OCX Control Kit, contact TegoSoft "
- Msg = Msg + "at:"
- Msg = Msg + CR + CR
- Msg = Msg + "TegoSoft Inc." + CR
- Msg = Msg + "P.O. Box 389" + CR
- Msg = Msg + "Bellmore, NY 11710"
- Msg = Msg + CR + CR
- Msg = Msg + "Phone: (516)783-4824"
- ' Display the About message box.
- MsgBox Msg, vbInformation, Title
- End Sub
- Private Sub mnuExit_Click()
- ' Terminate the program.
- Unload Me
- End Sub
- Private Sub swExit_Click()
- Dim Title
- Dim Question
- Dim Response
- ' If the user turned the swExit switch OFF,
- ' confirm that the user wants to exit the
- ' program, and if so, exit the program.
- If swExit.Value = False Then
- Title = "Exit Program"
- Question = "Are you sure you want to exit?"
- Response = MsgBox(Question, vbYesNo + vbQuestion, Title)
- If Response = vbYes Then
- Unload Me
- Else
- swExit.Value = True
- End If
- End If
- End Sub
- Private Sub TegoSpin1_SpinDown()
- Dim Counter
- ' Get the numeric value of the lblCounter label.
- Counter = Val(lblCounter.Caption)
- ' Decrement the count by 1.
- Counter = Counter - 1
- ' Is Counter less than 0?
- If Counter < 0 Then
- ' Counter is less than 0, so stop flashing the spin control
- ' and reset counter to 0.
- TegoSpin1.Flash = False
- Counter = 0
- Else
- ' Counter is greater than 0, so keep flashing the spin control.
- TegoSpin1.Flash = True
- End If
- ' Update the lblCounter label with the new count.
- lblCounter.Caption = Str(Counter)
- End Sub
- Private Sub TegoSpin1_SpinUp()
- Dim Counter
- ' Get the numeric value of the lblCounter label.
- Counter = Val(lblCounter.Caption)
- ' Increment the count by 1.
- Counter = Counter + 1
- ' Is Counter greater than 100?
- If Counter > 100 Then
- ' Counter is greater than 100, so stop flashing the spin control
- ' and set counter to 100.
- TegoSpin1.Flash = False
- Counter = 100
- Else
- ' Counter is less than 100, so keep flashing the spin control.
- TegoSpin1.Flash = True
- End If
- ' Update the lblCounter label with the new count.
- lblCounter.Caption = Str(Counter)
- End Sub
-